'use strict';

const Controller = require('egg').Controller;

class VideoApiController extends Controller {
    
  async getCategory() {  
    const ctx = this.ctx;
    const id = ctx.request.body.id;
    console.log(ctx.request.body);
    ctx.body= {
        "code": 0,
        "msg": {
            "zh": "成功"
        },
        "result": {
            "data": [
                {
                    "id": "61",
                    "pid": "0",
                    "title": "测试1",
                    "pic": "https://fitment.chenyoujiu.com/uploads/images/2018/04/27/ace8a023347d822f163d8d0e8550d9e4.jpg"
                },
                {
                    "id": "63",
                    "pid": "0",
                    "title": "测试2",
                    "pic": "https://fitment.chenyoujiu.com/uploads/images/2018/04/27/249fdbfa251f6bc2e012f561082d80be.jpg"
                },
                {
                    "id": "74",
                    "pid": "0",
                    "title": "测试3",
                    "pic": "https://fitment.chenyoujiu.com/uploads/images/2018/05/21/bef058f582c41648e0e4b842cda598c9.jpg"
                },
                {
                    "id": "339",
                    "pid": "0",
                    "title": "测试4",
                    "pic": "https://fitment.chenyoujiu.com/"
                },
                {
                    "id": "525",
                    "pid": "0",
                    "title": "测试5",
                    "pic": "https://fitment.chenyoujiu.com/"
                }
            ],
            "paginate": {
                "cur_page": "1",
                "total_page": 1,
                "total_record": 5
            }
        }
    }
}
    
}

module.exports = VideoApiController;
